home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v2.1 / Amiga Developer CD v2.1.iso / DevInfo / Networking / SANA2Revision3 < prev    next >
Text File  |  1996-07-14  |  3KB  |  77 lines

  1.  
  2.     $Id: SANA2Revision3 1.1 1996/07/14 22:18:55 heinz Exp $
  3.  
  4. Enhancement to SANA-IIR2 (S2R2) for better buffer management
  5. ============================================================
  6.  
  7. It has been observed that the standard buffer management callbacks
  8. may not be very efficient for certain types of hardware. They also
  9. do not allow driver DMA access. Therefore the original S2R2
  10. specification has been enhanced to allow for more flexible buffer
  11. management. This enhancement is fully backwards compatible.
  12. This document together with the original S2R2 documentation, should
  13. be referred to as "SANA-IIR3" or S2R3. Future enhancements shall be
  14. built upon S2R3.
  15.  
  16. All the new features are completely optional and do not collide
  17. with existing features. They may be used only when the protocol
  18. stack asks for them on opening a driver.
  19.  
  20. The enhancements consist of several new tags that may be specified
  21. by a protocol stack on OpenDevice() to offer certain data transfer
  22. options. It is up to the device driver to chose which callbacks to
  23. use at what time. These tags are advisory only and may be ignored
  24. by the driver for any data buffer at any time.
  25.  
  26. #define S2_CopyToBuff16         (S2_Dummy + 4)
  27. #define S2_CopyFromBuff16       (S2_Dummy + 5)
  28. #define S2_CopyToBuff32         (S2_Dummy + 6)
  29. #define S2_CopyFromBuff32       (S2_Dummy + 7)
  30.  
  31.     These are optional callbacks presented to the device with the
  32.     same calling interface as for S2_CopyToBuff or S2_CopyFromBuff,
  33.     respectively. The difference to the original callbacks is the
  34.     required and guaranteed transfer size and alignment for
  35.     accessing the device's buffer for a single piece of a data of
  36.     either 16 or 32 bits, a data word. The copy function called may
  37.     only use 16/32 bit aligned read/write commands of 16/32 bits at
  38.     once to transfer the data words, respectively. If the buffer
  39.     data length is not a multiple of the required data word
  40.     transfer size, the last data word transfer may contain garbage
  41.     padding in either transfer direction.
  42.  
  43.     These tags have been added to support direct writes into
  44.     hardware buffers that do not allow arbitrarily sized or aligned
  45.     accesses.
  46.  
  47. #define S2_DMACopyToBuff32      (S2_Dummy + 8)
  48. #define S2_DMACopyFromBuff32    (S2_Dummy + 9)
  49.  
  50.     If the protocol stack wants to optionally enhance data transfer
  51.     efficiency with DMA supporting devices, it may pass any of
  52.     these optional tags to the device on OpenDevice().
  53.  
  54.     If the device driver supports DMA, it may call the respective
  55.     callback with the abstract magic cookie ios2_Data in register
  56.     A0. The callback may return NULL in D0. In this case, the
  57.     driver may not use DMA for this buffer. Alternatively, the
  58.     callback may return the address of the actual data buffer
  59.     in D0, if it has these characteristics:
  60.  
  61.     - The buffer is in contigous memory. Depending on the intended
  62.       data direction, it shall be readable or writable.
  63.     - The buffer is aligned on a 32 bit boundary.
  64.     - The buffer size shall be a multiple of 32 bit and it is at
  65.       least >= ios2_DataLength.
  66.  
  67.     It is up to the driver to decide if it can use DMA for this
  68.     buffer and it shall fall back to the standard CPU callbacks if
  69.     necessary. The data transfer method actually used by the driver
  70.     will not be known in advance by the protocol stack.
  71.  
  72. It is obviously non conforming and always has been that way for
  73. SANA-II device developers to define their own tags.
  74.  
  75. Heinz Wrobel
  76. <heinz@amiga.de>
  77.